export const paginationBev = Behavior({
    data: {
        dataArray: [],
        total: 0
    },
    
    methods: {
        setMoreData(dataArray){
            const tempArray = this.data.dataArray.concat(dataArray)
            this.setData({
                dataArray: tempArray
            })
        },

        getCurrentStart(){
            return this.data.dataArray.length
        },
        hasMore(){
            if(this.data.dataArray.length >= this.data.total){
                return false
            } else {
                return true
            }
        },
        setTotal(total){
            this.data.total = total
        },
        initialize(){
            this.setData({
                dataArray: []
            })
            this.data.total = 0
        }
    }

})
